<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui">
    <meta name="referrer" content="no-referrer">
    <title>ZY Player</title>
    <style type="text/css">
      html, body {width:100%;height:100%;margin:0;padding:0;overflow:hidden;}
    </style>
  </head>
  <body>
    <div id="mse"></div>
    <script src="//cdn.jsdelivr.net/npm/xgplayer@1.1.4/browser/index.js" charset="utf-8"></script>
    <script src="//cdn.jsdelivr.net/npm/xgplayer-hls.js/browser/index.js" charset="utf-8"></script><script>
      function get (name) {
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);//search,查询？后面的参数，并匹配正则
        if (r!=null)return unescape(r[2]); return null;
      }
      let link = window.location.href
      let url = get('url')
      let player = new HlsJsPlayer({
        "id": "mse",
        "url": url,
        "playsinline": true,
        "autoplay": true,
        "fluid": true,
        "height": window.innerHeight,
        "width": window.innerWidth,
        "playbackRate": [ 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 3 ],
        "x5-video-player-type": "h5",
        "x5-video-player-fullscreen": "true"
      })
    </script>
  </body>
</html>
